
#ifndef MENUTREE_H
#define MENUTREE_H

#pragma once
/////////////////////////////////////////////////////////////////////////////
// CMenuTree window

class CMenuTree : public CTreeCtrl
{
public:
	CMenuTree();
	virtual ~CMenuTree();
    void InitTree();
    void InitTree1();
	bool isInited;
    int n_ItemCount;
protected:
    int m_space;
    int m_ItemHeight;

public:
    void NewMsgCome(int userid,LPARAM lParam);
    void NewTextCome(int userid,LPARAM lParam);
 
    INT SortItem(HTREEITEM hItem);
    void On_Dblclk(HTREEITEM hItem);
protected:

    void DrawBack(CDC *pDC,int nItemState,CRect rect);
    void DrawFocusRect(CDC* pDC,LPCRECT lpRect);
    void DrawBmp(CDC *pDC,HTREEITEM hTreeItem,CRect rect,int flash);
    void DrawText(CDC *pDC,HTREEITEM hTreeItem,CRect rect);

	// Generated message map functions
protected:
    COLORREF crBkColor;
    COLORREF crTextColor;
	//{{AFX_MSG(CMenuTree)
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
    afx_msg void OnCustomDraw(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};

#endif // MENUTREE_H
